3.6 \(\int \frac {\cos (a+b x^2)}{x^2} \, dx\)

Optimal. Leaf size=80 \[ -\sqrt {2 \pi } \sqrt {b} \sin (a) C\left (\sqrt {b} \sqrt {\frac {2}{\pi }} x\right )-\sqrt {2 \pi } \sqrt {b} \cos (a) S\left (\sqrt {b} \sqrt {\frac {2}{\pi }} x\right )-\frac {\cos \left (a+b x^2\right )}{x} \]

[Out]

-cos(b*x^2+a)/x-cos(a)*FresnelS(x*b^(1/2)*2^(1/2)/Pi^(1/2))*b^(1/2)*2^(1/2)*Pi^(1/2)-FresnelC(x*b^(1/2)*2^(1/2
)/Pi^(1/2))*sin(a)*b^(1/2)*2^(1/2)*Pi^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3388, 3353, 3352, 3351} \[ -\sqrt {2 \pi } \sqrt {b} \sin (a) \text {FresnelC}\left (\sqrt {\frac {2}{\pi }} \sqrt {b} x\right )-\sqrt {2 \pi } \sqrt {b} \cos (a) S\left (\sqrt {b} \sqrt {\frac {2}{\pi }} x\right )-\frac {\cos \left (a+b x^2\right )}{x} \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b*x^2]/x^2,x]

[Out]

-(Cos[a + b*x^2]/x) - Sqrt[b]*Sqrt[2*Pi]*Cos[a]*FresnelS[Sqrt[b]*Sqrt[2/Pi]*x] - Sqrt[b]*Sqrt[2*Pi]*FresnelC[S
qrt[b]*Sqrt[2/Pi]*x]*Sin[a]

Rule 3351

Int[Sin[(d_.)*((e_.) + (f_.)*(x_))^2], x_Symbol] :> Simp[(Sqrt[Pi/2]*FresnelS[Sqrt[2/Pi]*Rt[d, 2]*(e + f*x)])/
(f*Rt[d, 2]), x] /; FreeQ[{d, e, f}, x]

Rule 3352

Int[Cos[(d_.)*((e_.) + (f_.)*(x_))^2], x_Symbol] :> Simp[(Sqrt[Pi/2]*FresnelC[Sqrt[2/Pi]*Rt[d, 2]*(e + f*x)])/
(f*Rt[d, 2]), x] /; FreeQ[{d, e, f}, x]

Rule 3353

Int[Sin[(c_) + (d_.)*((e_.) + (f_.)*(x_))^2], x_Symbol] :> Dist[Sin[c], Int[Cos[d*(e + f*x)^2], x], x] + Dist[
Cos[c], Int[Sin[d*(e + f*x)^2], x], x] /; FreeQ[{c, d, e, f}, x]

Rule 3388

Int[Cos[(c_.) + (d_.)*(x_)^(n_)]*((e_.)*(x_))^(m_), x_Symbol] :> Simp[((e*x)^(m + 1)*Cos[c + d*x^n])/(e*(m + 1
)), x] + Dist[(d*n)/(e^n*(m + 1)), Int[(e*x)^(m + n)*Sin[c + d*x^n], x], x] /; FreeQ[{c, d, e}, x] && IGtQ[n,
0] && LtQ[m, -1]

Rubi steps

\begin {align*} \int \frac {\cos \left (a+b x^2\right )}{x^2} \, dx &=-\frac {\cos \left (a+b x^2\right )}{x}-(2 b) \int \sin \left (a+b x^2\right ) \, dx\\ &=-\frac {\cos \left (a+b x^2\right )}{x}-(2 b \cos (a)) \int \sin \left (b x^2\right ) \, dx-(2 b \sin (a)) \int \cos \left (b x^2\right ) \, dx\\ &=-\frac {\cos \left (a+b x^2\right )}{x}-\sqrt {b} \sqrt {2 \pi } \cos (a) S\left (\sqrt {b} \sqrt {\frac {2}{\pi }} x\right )-\sqrt {b} \sqrt {2 \pi } C\left (\sqrt {b} \sqrt {\frac {2}{\pi }} x\right ) \sin (a)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.18, size = 81, normalized size = 1.01 \[ -\sqrt {2 \pi } \sqrt {b} \left (\sin (a) C\left (\sqrt {b} \sqrt {\frac {2}{\pi }} x\right )+\cos (a) S\left (\sqrt {b} \sqrt {\frac {2}{\pi }} x\right )\right )+\frac {\sin (a) \sin \left (b x^2\right )}{x}-\frac {\cos (a) \cos \left (b x^2\right )}{x} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b*x^2]/x^2,x]

[Out]

-((Cos[a]*Cos[b*x^2])/x) - Sqrt[b]*Sqrt[2*Pi]*(Cos[a]*FresnelS[Sqrt[b]*Sqrt[2/Pi]*x] + FresnelC[Sqrt[b]*Sqrt[2
/Pi]*x]*Sin[a]) + (Sin[a]*Sin[b*x^2])/x

________________________________________________________________________________________

fricas [A]  time = 0.87, size = 70, normalized size = 0.88 \[ -\frac {\sqrt {2} \pi x \sqrt {\frac {b}{\pi }} \cos \relax (a) \operatorname {S}\left (\sqrt {2} x \sqrt {\frac {b}{\pi }}\right ) + \sqrt {2} \pi x \sqrt {\frac {b}{\pi }} \operatorname {C}\left (\sqrt {2} x \sqrt {\frac {b}{\pi }}\right ) \sin \relax (a) + \cos \left (b x^{2} + a\right )}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x^2+a)/x^2,x, algorithm="fricas")

[Out]

-(sqrt(2)*pi*x*sqrt(b/pi)*cos(a)*fresnel_sin(sqrt(2)*x*sqrt(b/pi)) + sqrt(2)*pi*x*sqrt(b/pi)*fresnel_cos(sqrt(
2)*x*sqrt(b/pi))*sin(a) + cos(b*x^2 + a))/x

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos \left (b x^{2} + a\right )}{x^{2}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x^2+a)/x^2,x, algorithm="giac")

[Out]

integrate(cos(b*x^2 + a)/x^2, x)

________________________________________________________________________________________

maple [A]  time = 0.03, size = 57, normalized size = 0.71 \[ -\frac {\cos \left (b \,x^{2}+a \right )}{x}-\sqrt {b}\, \sqrt {2}\, \sqrt {\pi }\, \left (\cos \relax (a ) \mathrm {S}\left (\frac {x \sqrt {b}\, \sqrt {2}}{\sqrt {\pi }}\right )+\sin \relax (a ) \FresnelC \left (\frac {x \sqrt {b}\, \sqrt {2}}{\sqrt {\pi }}\right )\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(b*x^2+a)/x^2,x)

[Out]

-cos(b*x^2+a)/x-b^(1/2)*2^(1/2)*Pi^(1/2)*(cos(a)*FresnelS(x*b^(1/2)*2^(1/2)/Pi^(1/2))+sin(a)*FresnelC(x*b^(1/2
)*2^(1/2)/Pi^(1/2)))

________________________________________________________________________________________

maxima [C]  time = 1.58, size = 73, normalized size = 0.91 \[ \frac {\sqrt {b x^{2}} {\left ({\left (-\left (i + 1\right ) \, \sqrt {2} \Gamma \left (-\frac {1}{2}, i \, b x^{2}\right ) + \left (i - 1\right ) \, \sqrt {2} \Gamma \left (-\frac {1}{2}, -i \, b x^{2}\right )\right )} \cos \relax (a) + {\left (\left (i - 1\right ) \, \sqrt {2} \Gamma \left (-\frac {1}{2}, i \, b x^{2}\right ) - \left (i + 1\right ) \, \sqrt {2} \Gamma \left (-\frac {1}{2}, -i \, b x^{2}\right )\right )} \sin \relax (a)\right )}}{8 \, x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x^2+a)/x^2,x, algorithm="maxima")

[Out]

1/8*sqrt(b*x^2)*((-(I + 1)*sqrt(2)*gamma(-1/2, I*b*x^2) + (I - 1)*sqrt(2)*gamma(-1/2, -I*b*x^2))*cos(a) + ((I
- 1)*sqrt(2)*gamma(-1/2, I*b*x^2) - (I + 1)*sqrt(2)*gamma(-1/2, -I*b*x^2))*sin(a))/x

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\cos \left (b\,x^2+a\right )}{x^2} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b*x^2)/x^2,x)

[Out]

int(cos(a + b*x^2)/x^2, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos {\left (a + b x^{2} \right )}}{x^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(b*x**2+a)/x**2,x)

[Out]

Integral(cos(a + b*x**2)/x**2, x)

________________________________________________________________________________________